#! /usr/bin/env python
#
# Copyright 2008 Spencer Davis <SpencerDavis91@gmail.com>
#
# Tuxedo is a simple todo list application for GNOME.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://gnu.org/licenses/.>
#

import gtk
import gtk.glade
from database import Database
from mainwindow import MainWindow
from trayicon import TrayIcon

class Tuxedo:
    def __init__(self):
        # Create a connection to the database
        self.db = Database()

        # Create the main window
        self.mainWindow = MainWindow(self.db)

        # Create the tray icon
        self.trayicon = TrayIcon(self.mainWindow)

        # Refresh the list of tasks
        self.mainWindow.refresh()

        # Run gtk
        gtk.main()

# If the program is not being imported, run it
if __name__ == '__main__':
    tuxedo = Tuxedo()
